package ooday03;

public class Test {
    public static void main(String[] args) {
       Dog[] dogs = new Dog[3];
       dogs[0] = new Dog("藏獒",1,"白");
       dogs[1] = new Dog("博美",2,"蓝");
       dogs[2] = new Dog("柯基",3,"棕");
        System.out.println(dogs[2].name);

        for (int i = 0;i<dogs.length; i++){
            dogs[i].eat();
            dogs[i].lookHome();
        }

        Chick[] chicks = new Chick[3];
        chicks[0] = new Chick("小母鸡",1,"白");
        chicks[1] = new Chick("中母鸡",2,"黑");
        chicks[2] = new Chick("大母鸡",3,"棕");

        Fish[] fish = new Fish[3];
        fish[0] = new Fish("小金鱼",1,"金");
        fish[1] = new Fish("小丑鱼",2,"红");
        fish[2].drink();
    }

}
